package echat.future.cn.echat.my.view;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import echat.future.cn.echat.R;
import echat.future.cn.echat.databinding.ActivityEditSignBinding;
import echat.future.cn.echat.my.weight.Navagation.AdapterNavagation;
import echat.future.cn.echat.my.weight.Navagation.IBaseNavagation;

public class EditSignActivity extends BaseActivity<ActivityEditSignBinding>{
    AdapterNavagation adapterNavagation;
    @Override
    public int layoutId() {
        return R.layout.activity_edit_sign;
    }

    @Override
    public IBaseNavagation navagation() {
        adapterNavagation =  new AdapterNavagation(this).setBack(R.drawable.btn_back).setNavagationBackgroudColor(R.color.color_161823);
        return adapterNavagation;
    }

    @Override
    public void initView() {
        adapterNavagation.setTitle(getIntent().getStringExtra("title"),16,R.color.white);
        bind.etInfo.setHint(getIntent().getStringExtra("title"));
        bind.save.setOnClickListener(v -> {
            if(bind.etInfo.getText().toString().equals("")){
                toast("请输入数据");
                return;
            }
            setResult(RESULT_OK,new Intent().putExtra("data",bind.etInfo.getText().toString()));
            finish();
        });
    }

}
